package models;
 
import java.util.*;
import javax.persistence.*;
 
import play.db.jpa.*;
 
@Entity
public class User extends Model {
 
    public Date createdOn;
    public Date registredOn;
    public Date validetedOn;
    public String email;
    public String username;
    public String password;
    public Date deletedOn;

    @ManyToOne
    public User createdBy;

    @ManyToOne
    public User deletedBy;

    @ManyToOne
    public UserProfile profile;

    @ManyToOne
    public UserType type;

    public User(String email, String username, String password, UserProfile profile, UserType type) {
        this.email = email;
        this.username = username;
        this.password = password;
        this.profile = profile;
        this.type = type;
    }

    @Override
    public String toString() {
        return this.username;    //To change body of overridden methods use File | Settings | File Templates.
    }
}